600
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("P1")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oColumn1 := oTree:Columns():Add("P2")
			oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn1:PartialCheck := .T.
			oColumn1:FormatColumn := "1 index ``"
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child A")
			oItems:InsertItem(h,,"Child B")
			oItems:InsertItem(h,,"Child A")
			oItems:InsertItem(h,,"Child B")
			oItems:AddItem("Root")
			oItems:AddItem("Root")
		oTree:SingleSort := .F.
		oTree:Layout := "multiplesort=" + CHR(34) + "C0:1 C1:2" + CHR(34) + ";collapse=" + CHR(34) + "" + CHR(34) + ""
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
599
How can I get ride / hide the image being dragged by OLE Drag and Drop
PROCEDURE OnOLEStartDrag(oTree,Data,AllowedEffects)
	/*Data.SetData("data to drag")*/
	AllowedEffects := 1
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:OLEStartDrag := {|Data,AllowedEffects| OnOLEStartDrag(oTree,Data,AllowedEffects)} /*Occurs when the OLEDrag method is called.*/

		oTree:OLEDropMode := 1/*exOLEDropManual*/
		oTree:SetProperty("Background",34/*exDragDropAfter*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
598
How can I export checked items only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oColumns := oTree:Columns()
			oColumns:Add("C1"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumns:Add("C2"):FormatColumn := "1 index `A-Z`"
			oColumns:Add("C3"):FormatColumn := "100 index ``"
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:SetProperty("CellState",oItems:AddItem("Item 2"),0,1)
			oItems:SetProperty("CellState",oItems:AddItem("Item 3"),0,1)
		oTree:EndUpdate()
		DevOut( "Export CSV Checked Items Only:" )
		DevOut( Transform(oTree:Export("","chk"),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
597
How can I export a hidden column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oColumns := oTree:Columns()
			oColumns:Add("C1")
			oColumn := oColumns:Add("C2")
				oColumn:FormatColumn := "1 index `A-Z`"
				oColumn:Visible := .F.
			oColumn1 := oColumns:Add("C3")
				oColumn1:FormatColumn := "100 index ``"
				oColumn1:Visible := .F.
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
		oTree:EndUpdate()
		DevOut( "Export CSV Hidden Columns (1,2):" )
		DevOut( Transform(oTree:Export("","|1,2"),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
596
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:AutoDrag := 3/*exAutoDragPositionAny*/
		oTree:HasLines := 1/*exSolidLine*/
		oTree:Indent := 16
		oTree:MarkSearchColumn := .F.
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("")
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn:FormatColumn := "((1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 + `` :  (=:0 mid (1 + 1 + =:1) )  + `)` ) + ` ` + value"
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
			oItems:SetProperty("ExpandItem",0,.T.)
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
595
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:AutoDrag := 3/*exAutoDragPositionAny*/
		oTree:HasLines := 1/*exSolidLine*/
		oTree:Indent := 16
		oColumns := oTree:Columns()
			oColumns:Add("Default")
			oColumn := oColumns:Add("")
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn:SetProperty("Def",49/*exCellPaddingRight*/,4)
				oColumn:AllowSizing := .F.
				oColumn:Width := 36
				oColumn:Position := 0
				oColumn:FormatColumn := "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =:1) ) "
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
			oItems:SetProperty("ExpandItem",0,.T.)
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
594
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:AutoDrag := 3/*exAutoDragPositionAny*/
		oTree:HasLines := 1/*exSolidLine*/
		oTree:Indent := 16
		oColumns := oTree:Columns()
			oColumns:Add("Default")
			oColumn := oColumns:Add("")
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn:SetProperty("Def",49/*exCellPaddingRight*/,4)
				oColumn:Alignment := 2/*RightAlignment*/
				oColumn:AllowSizing := .F.
				oColumn:Width := 24
				oColumn:Position := 0
				oColumn:FormatColumn := "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) "
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
			oItems:SetProperty("ExpandItem",0,.T.)
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
593
Is it possible to have a different alignment for parts of the cell's caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:TreeColumnIndex := -1
		oTree:DrawGridLines := -2/*exRowLines*/
		oColumn := oTree:Columns():Add("Default")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oItems := oTree:Items()
			oItems:SetProperty("CellHAlignment",oItems:AddItem("all-left"),0,0/*LeftAlignment*/)
			oItems:SetProperty("CellHAlignment",oItems:AddItem("all-center"),0,1/*CenterAlignment*/)
			oItems:SetProperty("CellHAlignment",oItems:AddItem("all-right"),0,2/*RightAlignment*/)
			h := oItems:AddItem("left<c>center<r>right")
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
592
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("MultipleLine")
				oColumn:Width := 32
				oColumn:SetProperty("Def",16/*exCellSingleLine*/,.F.)
				oColumn:SetProperty("Def",64/*exColumnResizeContiguously*/,.T.)
			oColumn1 := oColumns:Add("SingleLine")
				oColumn1:SetProperty("Def",16/*exCellSingleLine*/,.F.)
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("This is a bit of long text that should break the line"),1,"This is a bit of long text that should break the line")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
591
How do I sort the index column as numeric

PROCEDURE OnAddItem(oTree,Item)
	LOCAL oItems
	oItems := oTree:Items()
		oItems:SetProperty("CellData",Item,1,oItems:ItemToIndex(Item))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AddItem := {|Item| OnAddItem(oTree,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oTree:BeginUpdate()
		oTree:DrawGridLines := -1/*exAllLines*/
		oTree:ColumnAutoResize := .T.
		oTree:ShowFocusRect := .F.
		oColumn := oTree:Columns():Add("Next")
			oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,4)
			oColumn:SetProperty("Def",52/*exHeaderPaddingLeft*/,4)
		oColumn1 := oTree:Columns():Add("Index")
			oColumn1:AllowSizing := .F.
			oColumn1:Width := 48
			oColumn1:FormatColumn := "(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)"
			oColumn1:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn1:SortType := 5/*SortUserData*/
			oColumn1:Position := 0
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
			oItems:AddItem("Item 4")
			oItems:AddItem("Item 5")
			oItems:AddItem("Item 6")
			oItems:AddItem("Item 7")
			oItems:AddItem("Item 8")
			oItems:AddItem("Item 9")
			oItems:AddItem("Item 10")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
590
How can I put icons/images into buttons

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oTree:Columns():Add("C+B")
			oColumn:AllowSizing := .F.
			oColumn:Width := 48
			oColumn:FormatColumn := "` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `"
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:SetProperty("Def",2/*exCellHasButton*/,.T.)
			oColumn:SetProperty("Def",3/*exCellButtonAutoWidth*/,.T.)
		oTree:Columns():Add("")
		oTree:DrawGridLines := 2/*exVLines*/
		oTree:DefaultItemHeight := 20
		oItems := oTree:Items()
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
589
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

PROCEDURE OnCellButtonClick(oTree,Item,ColIndex)
	DevOut( "CellButtonClick" )
	DevOut( Transform(Item,"") )
RETURN

PROCEDURE OnCellStateChanged(oTree,Item,ColIndex)
	DevOut( "CellStateChanged" )
	DevOut( Transform(Item,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:CellButtonClick := {|Item,ColIndex| OnCellButtonClick(oTree,Item,ColIndex)} /*Fired after the user clicks on the cell of button type. */
		oTree:CellStateChanged := {|Item,ColIndex| OnCellStateChanged(oTree,Item,ColIndex)} /*Fired after cell's state has been changed.*/

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oColumn := oTree:Columns():Add("")
			oColumn:AllowSizing := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 index ``"
		oColumn1 := oTree:Columns():Add("Def")
			oColumn1:AllowSizing := .F.
			oColumn1:Width := 48
			oColumn1:FormatColumn := "`     `"
			oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn1:SetProperty("Def",2/*exCellHasButton*/,.T.)
			oColumn1:SetProperty("Def",3/*exCellButtonAutoWidth*/,.T.)
		oTree:Columns():Add("")
		oItems := oTree:Items()
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
588
Does filtering work with umlauts / accents characters
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("Names")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 3/*exPattern*/
		oItems := oTree:Items()
			oItems:AddItem("Mantel")
			oItems:AddItem("Mechanik")
			oItems:AddItem("Motor")
			oItems:AddItem("Murks")
			oItems:AddItem("Märchen")
			oItems:AddItem("Möhren")
			oItems:AddItem("Mühle")
			oItems:AddItem("Sérigraphie")
		oTree:Columns:Item(0):Filter := "*ä*"
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
587
The Items.FirstVisibleItem property is read-only. How can I change the first visible item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oTree
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oTree:ColumnAutoResize := .F.
		oTree:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oColumn := oTree:Columns():Add("Pos")
			oColumn:Position := 0
			oColumn:FormatColumn := "0 index ``"
			oColumn:Width := 32
			oColumn:SetProperty("Def",4/*exCellBackColor*/,15790320)
		oTree:SetProperty("ScrollPos",.T.,13)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
586
How FullPath method works

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:SetProperty("CellCaption",h,1,"A")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Child 1"),1,"B")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Child 2"),1,"C")
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:SearchColumnIndex := 1
		DevOut( Transform(oTree:SearchColumnIndex(),"") )
		DevOut( :FullPath(oTree:Items:ItemByIndex(2)) )
		oTree:SearchColumnIndex := 0
		DevOut( Transform(oTree:SearchColumnIndex(),"") )
		DevOut( :FullPath(oTree:Items:ItemByIndex(2)) )
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
585
How can I filter for multiple captions on a single column, using OR clause

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .T.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumn := oColumns:Add("Title")
				oColumn:Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:FilterBarPromptColumns := "1"
		oTree:FilterBarPromptPattern := "Vice Inside"
		oTree:FilterBarPromptType := 2/*exFilterPromptContainsAny*/
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
584
How can I filter for multiple captions on a single column, using AND clause

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .T.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumn := oColumns:Add("Title")
				oColumn:Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:FilterBarPromptColumns := "1"
		oTree:FilterBarPromptPattern := "Vice Sales"
		oTree:FilterBarPromptType := 1/*exFilterPromptContainsAll*/
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
583
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarHeight := 0
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:FilterBarPromptPattern := "London"
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
582
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

PROCEDURE OnAddItem(oTree,Item)
	LOCAL oItems
	oItems := oTree:Items()
		oItems:SetParent(Item,oItems:FindItem(oItems:CellCaption(Item,"ReportsTo"),"EmployeeID"))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AddItem := {|Item| OnAddItem(oTree,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:ColumnAutoResize := .F.
		oTree:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("SELECT * FROM Employees ORDER BY ReportsTo","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:Items():SetProperty("ExpandItem",0,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
581
Is there any option to control where I can drop the items when using the AutoDrag property
PROCEDURE OnAllowAutoDrag(oTree,Item,NewParent,InsertA,InsertB,Cancel)
	LOCAL oItems
	oItems := oTree:Items()
		DevOut( "NewParent" )
		DevOut( Transform(oItems:CellCaption(NewParent,0),"") )
		DevOut( "After" )
		DevOut( Transform(oItems:CellCaption(InsertA,0),"") )
		DevOut( "Before" )
		DevOut( Transform(oItems:CellCaption(InsertB,0),"") )
	Cancel := .T.
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AllowAutoDrag := {|Item,NewParent,InsertA,InsertB,Cancel| OnAllowAutoDrag(oTree,Item,NewParent,InsertA,InsertB,Cancel)} /*Occurs when the user drags the item between InsertA and InsertB as child of NewParent.*/

		oTree:BeginUpdate()
		oTree:AutoDrag := 3/*exAutoDragPositionAny*/
		oTree:LinesAtRoot := 0/*exNoLinesAtRoot*/
		oTree:HasLines := 2/*exThinLine*/
		oTree:ShowFocusRect := .F.
		oTree:Columns():Add("Task")
		oItems := oTree:Items()
			h := oItems:AddItem("Group 1")
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemBold",h,.T.)
			h1 := oItems:InsertItem(h,,"Task 1")
			h2 := oItems:InsertItem(h,,"Task 2")
			h3 := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Group 2")
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:SetProperty("ItemDivider",h,0)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
580
The FindPath is not case sensitive. How can I make it work case sensitive

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Default")
		oTree:ASCIIUpper := ""
		oItems := oTree:Items()
			h := oItems:AddItem("L:")
			oItems:InsertItem(h,,"test")
			oItems:InsertItem(h,,"Test")
			oItems:InsertItem(h,,"TEST")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",oItems:FindPath("L:\TEST"),.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
579
How do I enable / display a tooltip while user selects new items from the drop down filter panel

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 13568/*exShowExclude+exEnableToolTip+exShowFocusItem+exShowCheckBox*/
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
			oItems:AddItem("Item 4")
		oColumn1 := oTree:Columns:Item(0)
			oColumn1:FilterType := 752/*exFilterExclude+exFilter*/
			oColumn1:Filter := "Item 1|Item 4"
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
578
How can I align captions of items with checkbox, with items with no checkbox

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			oItems:SetProperty("CellImages",oItems:AddItem(0),0,"1")
			oItems:SetProperty("CellHasCheckBox",oItems:AddItem(1),0,.T.)
			oItems:SetProperty("CellImages",oItems:AddItem(2),0,"1")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
577
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
PROCEDURE OnMouseDown(oTree,Button,Shift,X,Y)
	/*Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))*/

RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MouseDown := {|Button,Shift,X,Y| OnMouseDown(oTree,Button,Shift,X,Y)} /*Occurs when the user presses a mouse button.*/

		oTree:BeginUpdate()
		oTree:TreeColumnIndex := -1
		oTree:SetProperty("SelForeColor",oTree:ForeColor())
		oColumn := oTree:Columns():Add("Buttons")
			oColumn:Alignment := 1/*CenterAlignment*/
			oColumn:SetProperty("Def",2/*exCellHasButton*/,.T.)
		oItems := oTree:Items()
			oItems:AddItem("Button A")
			oItems:AddItem("Button B")
			oItems:AddItem("Button C")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
576
Does the title of the cell's tooltip supports HTML format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("")
			oColumn:Caption := ""
			oColumn:HTMLCaption := "Column"
		oItems := oTree:Items()
			oItems:SetProperty("CellToolTip",oItems:AddItem("tooltip w/h different title"),0,"<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that's shown when the user hovers the cell. This shows the title centered with a different color.")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
575
How do I specify a different title for the cell's tooltip

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("")
			oColumn:Caption := "This is the title"
			oColumn:HTMLCaption := "Column"
		oItems := oTree:Items()
			oItems:SetProperty("CellToolTip",oItems:AddItem("tooltip w/h different title"),0,"This is bit of text that's shown when the user hovers the cell.")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
574
The cell's tooltip displays the column's caption in its title. How can I get ride of that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumns := oTree:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("tooltip w/h caption")
			oItems:SetProperty("CellToolTip",h,0,"This is bit of text that's shown when the user hovers the cell. This shows the column's caption in the title.")
			oItems:SetProperty("CellCaption",h,1,"tooltip no caption")
			oItems:SetProperty("CellToolTip",h,1,"This is bit of text that's shown when the user hovers the cell. This shows no column's caption in the title.")
		oColumn := oTree:Columns():Item("C2")
			oColumn:HTMLCaption := oColumn:Caption()
			oColumn:Caption := ""
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
573
How can I programmatically show the column's filter

PROCEDURE OnRClick(oTree)
	LOCAL i
	i := oTree:ItemFromPoint(-1,-1,c,hit)
	oTree:Columns:Item(c):ShowFilter("-1,-1,128,128")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:RClick := {|| OnRClick(oTree)} /*Fired when right mouse button is clicked*/

		oTree:BeginUpdate()
		oTree:ShowFocusRect := .F.
		oColumn := oTree:Columns():Add("Items ")
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
572
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

PROCEDURE OnColumnClick(oTree,Column)
	/*Column.SortOrder = 1*/
	oTree:SortOnClick := -1/*exDefaultSort*/
	oTree:Columns:Item("Sort"):SortOrder := 1/*SortAscending*/
	oTree:SortOnClick := 1/*exUserSort*/
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ColumnClick := {|Column| OnColumnClick(oTree,Column)} /*Fired after the user clicks on column's header.*/

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oTree:SortOnClick := 1/*exUserSort*/
		oTree:Columns():Add("Items")
		oTree:Columns():Add("Sort"):Visible := .F.
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Item 1 (3)"),1,3)
			oItems:SetProperty("CellCaption",oItems:AddItem("Item 2 (1)"),1,1)
			oItems:SetProperty("CellCaption",oItems:AddItem("Item 3 (2)"),1,2)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
571
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

PROCEDURE OnColumnClick(oTree,Column)
	/*Column.SortOrder = 1*/
	oTree:Items():SortChildren(0,"Sort",.T.)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ColumnClick := {|Column| OnColumnClick(oTree,Column)} /*Fired after the user clicks on column's header.*/

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oTree:SortOnClick := 1/*exUserSort*/
		oTree:Columns():Add("Items")
		oTree:Columns():Add("Sort"):Visible := .F.
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Item 1 (3)"),1,3)
			oItems:SetProperty("CellCaption",oItems:AddItem("Item 2 (1)"),1,1)
			oItems:SetProperty("CellCaption",oItems:AddItem("Item 3 (2)"),1,2)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
570
I have a 3 level hierarchy in the treeview, and I want to create a filter that only shows the items in the 2nd level of the hierarchy, is this possible

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h,hChild,hSubChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:MarkSearchColumn := .F.
		oTree:Columns():Add("Items")
		oTree:Columns():Add("Level"):Visible := .F.
		oItems := oTree:Items()
			h := oItems:AddItem("Parent")
			oItems:SetProperty("CellCaption",h,1,0)
			hChild := oItems:InsertItem(h,,"Child 1.1")
			oItems:SetProperty("CellCaption",hChild,1,1)
			hSubChild := oItems:InsertItem(hChild,,"SubChild A")
			oItems:SetProperty("CellCaption",hSubChild,1,2)
			hChild := oItems:InsertItem(h,,"Child 1.2")
			oItems:SetProperty("CellCaption",hChild,1,1)
			hSubChild := oItems:InsertItem(hChild,,"SubChild B")
			oItems:SetProperty("CellCaption",hSubChild,1,2)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:FilterInclude := 4/*exMatchingItemsOnly*/
		oColumn := oTree:Columns:Item("Level")
			oColumn:FilterType := 240/*exFilter*/
			oColumn:Filter := Transform(2,"")
		oTree:ApplyFilter()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
569
How can I sort by two-columns, one by date and one by time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:SingleSort := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Index"):FormatColumn := "1 index ``"
			oColumns:Add("Date"):SortType := 2/*SortDate*/
			oColumn := oColumns:Add("Time")
				oColumn:SortType := 4/*SortTime*/
				oColumn:FormatColumn := "time(value)"
		oItems := oTree:Items()
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,1,"01/01/2001")
			oItems:SetProperty("CellCaption",h,2,"01/01/2001 10:00:00")
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,1,"12/31/2000")
			oItems:SetProperty("CellCaption",h,2,"01/01/2001 10:00:00")
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,1,"01/01/2001")
			oItems:SetProperty("CellCaption",h,2,"01/01/2001 06:00:00")
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,1,"12/31/2000")
			oItems:SetProperty("CellCaption",h,2,"01/01/2001 08:00:00")
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,1,"01/01/2001")
			oItems:SetProperty("CellCaption",h,2,"01/01/2001 08:00:00")
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,1,"12/31/2000")
			oItems:SetProperty("CellCaption",h,2,"01/01/2001 06:00:00")
		oTree:Layout := "multiplesort=" + CHR(34) + "C1:1 C2:1" + CHR(34) + ""
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
568
We are using custom buttons for the +/- on the treeview control, is there a way to control the size of the image

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oAppearance
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(3,"gBFLBCJwBAEHhEJAAChABDEMACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSKUOQTDKMIziaQIRg8JYlDTJcIjKKEVQHFiXIrAKKwEgmEQMQiCcbzXIUBxAAqVZZFUaKAi+Qg4TLBAzUSAAYhtHqeJBjID4JA6UJXRpIAIQSSBUjGOg6TiMUYZAguAxCEzZUT0fAYUQSCC3ZzDCKoRpiCT7Xg8V5OVbjUz9P7AMBwLA7erxap6PJeD54QymGp/R5eMhyLI8UxXFqRY6veKtJhGDIrT5CEIQVA9EyXJqnahqOiaCguPorQy/dYYdg2BYBPS6MAvG4bVrOd59XrgN42fY2ByzAqlMQwS7rOqiY6YWTnehWToHE+JZUmoLB5CufQuAkBYkGO+ZrDWAo7keZZyHmH5+i8X4bluaJyHgGB9mQHx3JjBpViqJRHmueZ7H8Xo3i2fYAl+d5tncMRfDcdZeDMDIjCCJwokoEoQiEJ4KCIfIdgU" +;
		"SZIAWaoGCEUh2BIJ4gnKBgMDICAnHoCggg0Aw4k0KAJkIagaguYwIj4LAmiKEw2CUIIiHMUJSDQSYyGCFYMGQCJCD0JRjiMRg3gmTYjGSVgmgkchSD4JJklIRIXCSSQYj4U4UgkQhGE+EwJEkJJWhGpgGGIOBNmMdhPg8SRiHCGAlibNhohqJpJi4T4ZA2WYIgEYInGOGJlDkCQyECDoTEkKQ+E+C5oCIVhQCUCQpnSDoeg4SZZH8YdhjibQ7AiUgkgcJFyiyEYmGmOhqhyJ5pmILoYCKaRSB6Eg7CcZgZggaRqHqNoTiuDpKkKMormsQ4xiUYgYiKEo6CCWgWiqPovloZoGjoKQYiQBCAg==")
			oAppearance:Add(4,"gBFLBCJwBAEHhEJAAChABDcMACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSKUOQTDKMIziaQIRg8JYlDTJcIjKKEVQHFiXIrAKKwEgmEQMQiCcbzXIUBxAAqVZZFUaKAi+Qg4TLBAzUSAAYhtHqeJBjID4JA6UJXRpIAIQSSBUjGOg6TiMUYZAguAxCEzZUT0fAYUQSCC3ZzDCKoRpiCT7Xg8V5OVbjUz9P7AMBwLA7erxap6PJeD54QymGp/R5eMhyLI8UxXFqRY6veKtJhGDIrT5CEIQVA9EyXJqnahqOiaCguPorQy/dYYdg2BYBPS6MAvG4bVrOd59XrgN42fY2ByzAqlMQwS7rOqiY6YWTnehWToHE+JZUmoLB5CufQuAkBYkGO+ZrDWAo7keZZyHmPQ+g8X4fluYBhneEB9l0Iwpg6RRWiqFQfg+V5nnefh/GAB5yAIfRMFeRZdHeDJDCiSApkoMoEiQKBJmKCIfCcYQiHI" +;
		"FYFkmeBaBOA5JmgMIhgITICAmXoBkgIxAk4MxKAIcIaD+YpIjYLoLmMCI2CkJoiGMNgiCCIhDFCUg0EmMhghWDBkAkBg9CUY4jEYN4JA2IxklYJoJHIUg+CSZJSESFwkmUKRSFOFRlCIUIRhOZJCFISQ1iQdgEgGGJOBMeJdhOY5SFiHAmAkaYmG6GwmhmLhthsJJ5hSXYYkgFgKHgOYOFOEITCQCJpDSEoTmgQhUhOIRoHoGoCh+SJpnCZIeBedgaHgO4OlOMINCISByECDQikkGhuh2JwpmqBogCKaYiC6FwhmkQ4yHgYYYgaFopiuaRakCbIsisSpGjYOwaFYIYKCkK5CA2IRqiwCwFiYaBrkKEYKEAQCAgA==")
			oAppearance:Add(1,"CP:3 -4 -4 4 4")
			oAppearance:Add(2,"CP:4 -4 -4 4 4")
		oTree:DefaultItemHeight := 22
		oTree:LinesAtRoot := 1/*exGroupLinesAtRoot*/
		oTree:HasButtons := 4/*exCustom*/
		oTree:SetProperty("HasButtonsCustom",.F.,16777216)
		oTree:SetProperty("HasButtonsCustom",.T.,33554432)
		oTree:Columns():Add("Column")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
567
How can I connect to a DBF file
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		rs := CreateObject("ADODB.Recordset")
			rs:Open("Select * From foxcode.DBF","Provider=vfpoledb;Data Source=C:\Program Files\Microsoft Visual FoxPro 9\",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
566
Do you have any Fit-To-Page options when printing the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oPrint
	LOCAL oTree
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "FitToPage = On"
			oPrint:PrintExt := oTree
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
565
Does your control supports scrolling by touching the screen

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:AutoDrag := 4112/*exAutoDragScrollOnShortTouch+exAutoDragScroll*/
		oTree:ScrollBySingleLine := .T.
		oTree:ContinueColumnScroll := .T.
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
564
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SetProperty("BackColorAlternate",0x7ff0f0f0)
		oTree:Columns():Add("Column")
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
			oItems:AddItem("Item 4")
			oItems:AddItem("Item 5")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
563
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange

PROCEDURE OnCellStateChanged(oTree,Item,ColIndex)
	LOCAL oItems
	oItems := oTree:Items()
		oItems:SetProperty("CellCaption",Item,2,oItems:CellState(Item,0))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL var_ConditionalFormat
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:CellStateChanged := {|Item,ColIndex| OnCellStateChanged(oTree,Item,ColIndex)} /*Fired after cell's state has been changed.*/

		oTree:BeginUpdate()
		oTree:ShowFocusRect := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SelBackMode := 1/*exTransparent*/
		var_ConditionalFormat := oTree:ConditionalFormats:Add("%2 != 0")
			var_ConditionalFormat:Bold := .T.
			var_ConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			var_ConditionalFormat:ApplyTo := -1/*exFormatToItems*/
		oColumn := oTree:Columns():Add("")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:Width := 16
			oColumn:AllowSizing := .F.
		oTree:Columns():Add("Information")
		oTree:Columns():Add("Hidden"):Visible := .F.
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem(""),1,"This is a bit of text associated")
			h := oItems:AddItem("")
			oItems:SetProperty("CellCaption",h,1,"This is a bit of text associated")
			oItems:SetProperty("CellState",h,0,1)
			oItems:SetProperty("CellCaption",oItems:AddItem(""),1,"This is a bit of text associated")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
562
How can I start editing the cell as soon as the user clicks a cell

PROCEDURE OnAfterCellEdit(oTree,Item,ColIndex,NewCaption)
	oTree:Items():SetProperty("CellCaption",Item,ColIndex,NewCaption)
RETURN

PROCEDURE OnCancelCellEdit(oTree,Item,ColIndex,Reserved)
	oTree:Items():SetProperty("CellCaption",Item,ColIndex,Reserved)
RETURN

PROCEDURE OnClick(oTree)
	LOCAL oItems
	oItems := oTree:Items()
		oItems:Edit(oItems:FocusItem(),0)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AfterCellEdit := {|Item,ColIndex,NewCaption| OnAfterCellEdit(oTree,Item,ColIndex,NewCaption)} /*Occurs after data in the current cell is edited.*/
		oTree:CancelCellEdit := {|Item,ColIndex,Reserved| OnCancelCellEdit(oTree,Item,ColIndex,Reserved)} /*Occurs if the edit operation is canceled.*/
		oTree:Click := {|| OnClick(oTree)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/

		oTree:AllowEdit := .T.
		oTree:Columns():Add("Column")
		oTree:Items():AddItem("Item 1")
		oTree:Items():AddItem("Item 2")
		oTree:Items():AddItem("")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
561
How do I programmatically exclude items from the filter

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
			oItems:AddItem("Item 4")
		oColumn1 := oTree:Columns:Item(0)
			oColumn1:FilterType := 752/*exFilterExclude+exFilter*/
			oColumn1:Filter := "Item 1|Item 4"
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
560
How can I sort the columns to be displayed on the columns floating bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ColumnAutoResize := .F.
		oColumns := oTree:Columns()
			oColumns:Add("City"):Visible := .F.
			oColumns:Add("Start"):Visible := .F.
			oColumns:Add("End"):Visible := .F.
		oTree:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/
		oTree:ColumnsFloatBarSortOrder := 1/*SortAscending*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
559
How can I add a vertical padding

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:DrawGridLines := -1/*exAllLines*/
		oColumn := oTree:Columns():Add("Padding")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:SetProperty("Def",16/*exCellSingleLine*/,.F.)
			oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,6)
			oColumn:SetProperty("Def",49/*exCellPaddingRight*/,6)
			oColumn:SetProperty("Def",50/*exCellPaddingTop*/,6)
			oColumn:SetProperty("Def",51/*exCellPaddingBottom*/,6)
		oItems := oTree:Items()
			oItems:AddItem("padding")
			oItems:AddItem("padding")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
558
Is the PutItems method running .AddItem event

PROCEDURE OnAddItem(oTree,Item)
	DevOut( "Adding ..." )
	DevOut( Transform(oTree:Items:CellCaption(Item,0),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AddItem := {|Item| OnAddItem(oTree,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Def")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		DevOut( "Call PutItems" )
		oTree:PutItems(oTree:GetItems(-1))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
557
How do you embed HTML options into the anchor click string

PROCEDURE OnAnchorClick(oTree,AnchorID,Options)
	DevOut( Transform(AnchorID,"") )
	DevOut( Transform(Options,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AnchorClick := {|AnchorID,Options| OnAnchorClick(oTree,AnchorID,Options)} /*Occurs when an anchor element is clicked.*/

		oTree:BeginUpdate()
		oColumns := oTree:Columns()
			oColumns:Add("Car"):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			oItems:AddItem("<a mazda_1;options for 1>Mazda <b>1</b></a>")
			oItems:AddItem("<a mazda_2;options for 2>Mazda <b>2</b></a>")
			oItems:AddItem("<a mazda_3;options for 3a>Mazda <b>3.a</b></a>")
			oItems:AddItem("<a mazda_3;options for 3b>Mazda <b>3.b</b></a>")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
556
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78egBHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRxLC8Mw3BDvYDkOAABAIgI=")
		oTree:SetProperty("SelBackColor",0x1fffffe)
		oTree:ShowFocusRect := .F.
		oTree:Columns():Add("Items")
		oItems := oTree:Items()
			oItems:SetProperty("ItemBackColor",oItems:AddItem("red"),AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oItems:SetProperty("ItemBackColor",oItems:AddItem("blue"),AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oItems:SetProperty("ItemBackColor",oItems:AddItem("green"),AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
555
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:SelBackMode := 1/*exTransparent*/
		oTree:ShowFocusRect := .F.
		oTree:Columns():Add("Items")
		oItems := oTree:Items()
			oItems:SetProperty("ItemBackColor",oItems:AddItem("red"),AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oItems:SetProperty("ItemBackColor",oItems:AddItem("blue"),AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oItems:SetProperty("ItemBackColor",oItems:AddItem("green"),AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
554
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:SetProperty("SelBackColor",oTree:BackColor())
		oTree:SetProperty("SelForeColor",oTree:ForeColor())
		oTree:ShowFocusRect := .T.
		oTree:Columns():Add("Items")
		oItems := oTree:Items()
			oItems:SetProperty("ItemBackColor",oItems:AddItem("red"),AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oItems:SetProperty("ItemBackColor",oItems:AddItem("blue"),AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oItems:SetProperty("ItemBackColor",oItems:AddItem("green"),AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
553
How do I arrange my columns on multiple levels

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		oTree:DrawGridLines := -1/*exAllLines*/
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("C0")
				oColumn:ExpandColumns := "1,2"
				oColumn:DisplayExpandButton := .F.
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumns:Add("C3")
			oColumn1 := oColumns:Add("C4")
				oColumn1:ExpandColumns := "5,6"
				oColumn1:DisplayExpandButton := .F.
			oColumns:Add("C5")
			oColumn2 := oColumns:Add("C6")
				oColumn2:ExpandColumns := "6,7"
				oColumn2:DisplayExpandButton := .F.
			oColumns:Add("C7")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
552
Does your control support expandable header or columns, so I can arrange it on multiple levels

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:DrawGridLines := -1/*exAllLines*/
		oTree:SetProperty("BackColorLevelHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("Photo")
				oColumn:AllowSizing := .F.
				oColumn:Width := 32
			oColumns:Add("Personal Info")
			oColumns:Add("Title")
			oColumns:Add("Name")
			oColumns:Add("First")
			oColumns:Add("Last")
			oColumns:Add("Address")
			oColumns:Item("Personal Info"):ExpandColumns := "2,3"
			oColumn1 := oColumns:Item("Name")
				oColumn1:ExpandColumns := "4,5"
				oColumn1:Expanded := .F.
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
551
Does your control support subscript or superscript, in HTML captions

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ColumnAutoResize := .F.
		oTree:HeaderHeight := 28
		oTree:DefaultItemHeight := 24
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("Column 1")
				oColumn:HTMLCaption := "Column <b><off 2><font ;6>1"
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn1 := oColumns:Add("Column 2")
				oColumn1:HTMLCaption := "Column <b><off 2><font ;6>2"
				oColumn1:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn2 := oColumns:Add("Column 3")
				oColumn2:HTMLCaption := "Column <b><off 2><font ;6>3"
				oColumn2:SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			h := oItems:AddItem("Item <font ;6><off 4>1")
			oItems:SetProperty("CellCaption",h,1,"Item <font ;6><off -6>2")
			oItems:SetProperty("CellCaption",h,2,"Item <b><font ;6><off -6>2<off 4>3<off 4>1")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
550
Is there any property I can save and restore automatically the current setting, column position, size, and so on (2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Column")
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
		oTree:Layout := "Select=" + CHR(34) + "0" + CHR(34) + ";SingleSort=" + CHR(34) + "C0:2" + CHR(34) + ";Columns=1"
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
549
Is there any property I can save and restore automatically the current setting, column position, size, and so on (1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Column")
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
		oTree:Layout := "gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujMbjsfkMFk0YhkQgUOjUEl8gjcGO0ok8KMULjEaGMcj08kQAO8oMkTNEtGwAGQAqc7gUlhh1ABtAEsk9GpEfhElgVcsMupNlnlonlaAFcr0shUsp8QPEtnVJqJhmcIhUMh0QiU5sYAqMngUSuEMw07k8Qv0SgVRrNEuVflF2jF5x9JyNEm0TjQijemyE0jE3t+YruauoAu4Az1qj9BzRn0UzksSnAA0xDjY6qnAw8OiUQ0dwzN0zWz2t7j8/xURAGNvWH6k8xlEhklhEI0O/6QAgI="
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
548
I have noticed that the column's header is changed once the cursor hovers it. Is it possible to change that visual appearance

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2")
		oTree:SetProperty("BackColorHeader",0x1000000)
		oTree:SetProperty("Background",32/*exCursorHoverColumn*/,0x12d86ff)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
547
Is it possible to change the visual appearance of the columns selector/floating bar(3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ColumnAutoResize := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
		oTree:VisualAppearance():Add(2,"c:\exontrol\images\normal.ebn")
		oTree:VisualAppearance():Add(3,"c:\exontrol\images\pushed.ebn")
		oTree:SetProperty("Background",92/*exColumnsFloatAppearance*/,0x2000000)
		oTree:SetProperty("Background",87/*exColumnsFloatBackColor*/,0x3000000)
		oTree:SetProperty("Background",93/*exColumnsFloatCaptionBackColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 246,245,240 } )  , .F. ))
		oTree:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
546
Is it possible to change the visual appearance of the columns selector/floating bar(2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ColumnAutoResize := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
		oTree:VisualAppearance():Add(3,"c:\exontrol\images\pushed.ebn")
		oTree:SetProperty("Background",87/*exColumnsFloatBackColor*/,0x3000000)
		oTree:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
545
Is it possible to change the visual appearance of the columns selector/floating bar(1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:VisualAppearance():Add(2,"c:\exontrol\images\normal.ebn")
		oTree:SetProperty("Background",92/*exColumnsFloatAppearance*/,0x2000000)
		oTree:SetProperty("Background",87/*exColumnsFloatBackColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 246,245,240 } )  , .F. ))
		oTree:SetProperty("Background",93/*exColumnsFloatCaptionBackColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 246,245,240 } )  , .F. ))
		oTree:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
544
I am using the ColumnsFloatBarVisible property on True, but still not able to add any column on that list

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ColumnAutoResize := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
		oTree:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
543
Is it possible to list a column to columns selector/floating bar, but still user can use it

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ColumnAutoResize := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
			oColumn := oColumns:Add("Column 3")
				oColumn:Visible := .F.
				oColumn:Enabled := .F.
		oTree:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
542
How can I prevent a specific column not to be listed in the columns selector/floating bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ColumnAutoResize := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
			oColumn := oColumns:Add("Column 3")
				oColumn:Visible := .F.
				oColumn:AllowDragging := .F.
		oTree:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
541
Is it possible to change the "Columns" caption being shown in the columns selector/floating bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ColumnAutoResize := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
		oTree:SetProperty("Description",26/*exColumnsFloatBar*/,"Hidden Columns")
		oTree:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
540
How can I show the columns selector, so the user can drag and drop columns to the view

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ColumnAutoResize := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):Visible := .F.
		oTree:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
539
The column's header is changed while the cursor hovers it. Is it possible to prevent that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2")
		oTree:SetProperty("Background",32/*exCursorHoverColumn*/,-1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
538
Is there any public method to export the selected data

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oColumns := oTree:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2"):FormatColumn := "1 index `A-Z`"
			oColumns:Add("C3"):FormatColumn := "100 index ``"
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:SetProperty("SelectItem",oItems:AddItem("Item 2"),.T.)
			oItems:AddItem("Item 3")
		oTree:EndUpdate()
		DevOut( "Export CSV Selected Items Only:" )
		DevOut( Transform(oTree:Export("","sel"),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
537
Is it possible to auto-numbering the children items but still keeps the position after filtering

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5,oColumn6
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 240/*exFilter*/
			oColumn:Filter := "Child 2"
		oColumn1 := oTree:Columns():Add("Pos.1")
			oColumn1:FormatColumn := "1 ropos ''"
			oColumn1:Position := 0
			oColumn1:Width := 32
			oColumn1:AllowSizing := .F.
		oColumn2 := oTree:Columns():Add("Pos.2")
			oColumn2:FormatColumn := "1 ropos ':'"
			oColumn2:Position := 1
			oColumn2:Width := 32
			oColumn2:AllowSizing := .F.
		oColumn3 := oTree:Columns():Add("Pos.3")
			oColumn3:FormatColumn := "1 ropos ':|A-Z'"
			oColumn3:Position := 2
			oColumn3:Width := 32
			oColumn3:AllowSizing := .F.
		oColumn4 := oTree:Columns():Add("Pos.4")
			oColumn4:FormatColumn := "1 ropos '|A-Z|'"
			oColumn4:Position := 3
			oColumn4:Width := 32
			oColumn4:AllowSizing := .F.
		oColumn5 := oTree:Columns():Add("Pos.5")
			oColumn5:FormatColumn := "'<font Tahoma;7>' + 1 ropos '-<b>||A-Z'"
			oColumn5:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn5:Position := 4
			oColumn5:Width := 32
			oColumn5:AllowSizing := .F.
		oColumn6 := oTree:Columns():Add("Pos.6")
			oColumn6:FormatColumn := "'<b>'+ 1 ropos '</b>:<fgcolor=FF0000>|A-Z|'"
			oColumn6:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn6:Position := 5
			oColumn6:Width := 48
			oColumn6:AllowSizing := .F.
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
536
Is it possible to auto-numbering the children items too

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Items")
		oColumn := oTree:Columns():Add("Pos.1")
			oColumn:FormatColumn := "1 rpos ''"
			oColumn:Position := 0
			oColumn:Width := 32
			oColumn:AllowSizing := .F.
		oColumn1 := oTree:Columns():Add("Pos.2")
			oColumn1:FormatColumn := "1 rpos ':'"
			oColumn1:Position := 1
			oColumn1:Width := 32
			oColumn1:AllowSizing := .F.
		oColumn2 := oTree:Columns():Add("Pos.3")
			oColumn2:FormatColumn := "1 rpos ':|A-Z'"
			oColumn2:Position := 2
			oColumn2:Width := 32
			oColumn2:AllowSizing := .F.
		oColumn3 := oTree:Columns():Add("Pos.4")
			oColumn3:FormatColumn := "1 rpos '|A-Z|'"
			oColumn3:Position := 3
			oColumn3:Width := 32
			oColumn3:AllowSizing := .F.
		oColumn4 := oTree:Columns():Add("Pos.5")
			oColumn4:FormatColumn := "'<font Tahoma;7>' + 1 rpos '-<b>||A-Z'"
			oColumn4:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn4:Position := 4
			oColumn4:Width := 32
			oColumn4:AllowSizing := .F.
		oColumn5 := oTree:Columns():Add("Pos.6")
			oColumn5:FormatColumn := "'<b>'+ 1 rpos '</b>:<fgcolor=FF0000>|A-Z|'"
			oColumn5:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn5:Position := 5
			oColumn5:Width := 48
			oColumn5:AllowSizing := .F.
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
535
How can I find if there is any filter applied to the control

PROCEDURE OnFilterChange(oTree)
	DevOut( "If negative, the filter is present, else not" )
	DevOut( Transform(oTree:Items:VisibleItemCount(),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:FilterChange := {|| OnFilterChange(oTree)} /*Notifies your application that the filter is changed.*/

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:TreeColumnIndex := -1
		oTree:FilterInclude := 4/*exMatchingItemsOnly*/
		oColumn := oTree:Columns():Add("Column")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 240/*exFilter*/
			oColumn:Filter := "C1"
		oItems := oTree:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
534
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:TreeColumnIndex := -1
		oTree:FilterInclude := 4/*exMatchingItemsOnly*/
		oColumn := oTree:Columns():Add("Column")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 240/*exFilter*/
			oColumn:Filter := "C1|C2"
		oItems := oTree:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
533
Is there any method to get only the matched items and not the items with his parent

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:FilterInclude := 4/*exMatchingItemsOnly*/
		oColumn := oTree:Columns():Add("Column")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 240/*exFilter*/
			oColumn:Filter := "C1|C2"
		oItems := oTree:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
532
How can I add or change the padding (spaces) for captions in the control's header

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Padding-Left"):SetProperty("Def",52/*exHeaderPaddingLeft*/,18)
		oColumn := oTree:Columns():Add("Padding-Right")
			oColumn:SetProperty("Def",53/*exHeaderPaddingRight*/,18)
			oColumn:HeaderAlignment := 2/*RightAlignment*/
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
531
Do you have any plans to add cell spacing and cell padding to the cells

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:DrawGridLines := -2/*exRowLines*/
		oColumn := oTree:Columns():Add("Padding-Left")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,18)
		oTree:Columns():Add("No-Padding"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oTree:Columns():Add("Empty"):Position := 0
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Item A.1"),1,"Item A.2")
			oItems:SetProperty("CellCaption",oItems:AddItem("Item B.1"),1,"Item B.2")
			oItems:SetProperty("CellCaption",oItems:AddItem("Item C.1"),1,"Item C.2")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
530
Is it possible display numbers in the same format no matter of regional settings in the control panel

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Def"):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			h := oItems:AddItem(100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default positive)'")
			h := oItems:AddItem(100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '2|.|3|,|1|1')")
			h := oItems:AddItem(-100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default negative)'")
			h := oItems:AddItem(-100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '2|.|3|,|1|1')")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
529
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Def"):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			h := oItems:AddItem(0.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default)'")
			h := oItems:AddItem(0.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '|||||0') +  ' <fgcolor=808080>(Display no leading zeros)'")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
528
How can I specify the format for negative numbers

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Def"):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			h := oItems:AddItem(-100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default)'")
			h := oItems:AddItem(-100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '||||1') +  ' <fgcolor=808080>(Negative sign, number; for example, -1.1)'")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
527
Is it possible to change the grouping character when display numbers

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Def"):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			h := oItems:AddItem(100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default)'")
			h := oItems:AddItem(100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '|||-') +  ' <fgcolor=808080>(grouping character is -)'")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
526
How can I display numbers with 2 digits in each group

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Def"):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			h := oItems:AddItem(100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default)'")
			h := oItems:AddItem(100000.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '||2') +  ' <fgcolor=808080>(grouping by 2 digits)'")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
525
How can I display my numbers using a different decimal separator

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Def"):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			h := oItems:AddItem(100.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default)'")
			h := oItems:AddItem(100.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '|;') +  ' <fgcolor=808080>(decimal separator is <b>;</b>)'")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
524
Is it possible to display the numbers using 3 (three) digits

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Def"):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			h := oItems:AddItem(100.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '') +  ' <fgcolor=808080>(default)'")
			h := oItems:AddItem(100.27)
			oItems:SetProperty("FormatCell",h,0,"(value format '3') +  ' <fgcolor=808080>(3 digits)'")
			h := oItems:AddItem(100.27)
			oItems:SetProperty("FormatCell",h,0,"(value format 2) +  '  <fgcolor=808080>(2 digits)'")
			h := oItems:AddItem(100.27)
			oItems:SetProperty("FormatCell",h,0,"(value format 1) +  ' <fgcolor=808080>(1 digit)'")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
523
Is it possible to format numbers

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Name")
			oColumn := oColumns:Add("A")
				oColumn:SortType := 1/*SortNumeric*/
				oColumn:AllowSizing := .F.
				oColumn:Width := 36
				oColumn:FormatColumn := "len(value) ? value + ' +'"
			oColumn1 := oColumns:Add("B")
				oColumn1:SortType := 1/*SortNumeric*/
				oColumn1:AllowSizing := .F.
				oColumn1:Width := 36
				oColumn1:FormatColumn := "len(value) ? value + ' +'"
			oColumn2 := oColumns:Add("C")
				oColumn2:SortType := 1/*SortNumeric*/
				oColumn2:AllowSizing := .F.
				oColumn2:Width := 36
				oColumn2:FormatColumn := "len(value) ? value + ' ='"
			oColumn3 := oColumns:Add("A+B+C")
				oColumn3:SortType := 1/*SortNumeric*/
				oColumn3:Width := 64
				oColumn3:ComputedField := "dbl(%1)+dbl(%2)+dbl(%3)"
				oColumn3:FormatColumn := "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )"
				oColumn3:SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:SetProperty("CellCaptionFormat",h,4,2/*exComputedField*/)
			h1 := oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("CellCaption",h1,1,7)
			oItems:SetProperty("CellCaption",h1,2,3)
			oItems:SetProperty("CellCaption",h1,3,1)
			h1 := oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("CellCaption",h1,1,-2)
			oItems:SetProperty("CellCaption",h1,2,-2)
			oItems:SetProperty("CellCaption",h1,3,-4)
			h1 := oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("CellCaption",h1,1,2)
			oItems:SetProperty("CellCaption",h1,2,2)
			oItems:SetProperty("CellCaption",h1,3,-4)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
522
I am using the FormatColumn/FormatCell to format my columns. Is it possible to ignore the SelForeColor, so the foreground color for selected items does not override my settings

PROCEDURE OnSelectionChanged(oTree)
	LOCAL oItems
	oItems := oTree:Items()
		oItems:ClearItemBackColor(0)
		oItems:SetProperty("ItemBackColor",oItems:SelectedItem(0),AutomationTranslateColor( GraMakeRGBColor  ( { 128,255,255 } )  , .F. ))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SelectionChanged := {|| OnSelectionChanged(oTree)} /*Fired after a new item has been selected.*/

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oTree:SetProperty("SelForeColor",oTree:ForeColor())
		oTree:SetProperty("SelBackColor",oTree:BackColor())
		oTree:ShowFocusRect := .F.
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("Format")
				oColumn:FormatColumn := "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )"
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			oItems:AddItem(10)
			oItems:AddItem(-8)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
521
Is it possible to change the height for all items at once

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Items")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",0,.T.)
		oTree:EndUpdate()
		oTree:DefaultItemHeight := 12
		oTree:Items():SetProperty("ItemHeight",0,12)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
520
How can I add a footer row

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ShowLockedItems := .T.
		oTree:DrawGridLines := 2/*exVLines*/
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			oItems:SetProperty("LockedItemCount",2/*BottomAlignment*/,1)
			h := oItems:LockedItem(2/*BottomAlignment*/,0)
			oItems:SetProperty("ItemBackColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
			oItems:SetProperty("ItemForeColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
			oItems:SetProperty("CellCaption",h,0,"footer c1")
			oItems:SetProperty("CellCaption",h,1,"footer c2")
			oItems:SetProperty("CellCaption",oItems:AddItem("cell"),1,"cell")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
519
How can I add a header row

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ShowLockedItems := .T.
		oTree:DrawGridLines := 2/*exVLines*/
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			oItems:SetProperty("LockedItemCount",0/*TopAlignment*/,1)
			h := oItems:LockedItem(0/*TopAlignment*/,0)
			oItems:SetProperty("ItemBackColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
			oItems:SetProperty("ItemForeColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
			oItems:SetProperty("CellCaption",h,0,"footer c1")
			oItems:SetProperty("CellCaption",h,1,"footer c2")
			oItems:SetProperty("CellCaption",oItems:AddItem("cell"),1,"cell")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
518
When I'm trying to show string with "line break" character (vbCrLF) in a textbox, it shows 2 squares. Is there any way to hide these squares

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oColumns := oTree:Columns()
			oColumns:Add("Value")
			oColumn := oColumns:Add("CellSingleLine = False")
				oColumn:ComputedField := "%0"
				oColumn:SetProperty("Def",16/*exCellSingleLine*/,.F.)
			oColumn1 := oColumns:Add("FormatColumn/replace CRLF")
				oColumn1:ComputedField := "%0"
				oColumn1:FormatColumn := "value replace `\r\n` with ``"
			oColumn2 := oColumns:Add("FormatColumn/replace TAB,CRLF")
				oColumn2:ComputedField := "%0"
				oColumn2:FormatColumn := "(value replace `\t` with ``) replace `\r\n` with ``"
		oItems := oTree:Items()
			oItems:AddItem("a\ta\r\nb\tb")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
517
Is there any way to "unselect" radio group

PROCEDURE OnDblClick(oTree,Shift,X,Y)
	LOCAL oItems
	LOCAL h
	oItems := oTree:Items()
		h := oItems:CellChecked(1234)
		oItems:SetProperty("CellHasCheckBox",0,h,.T.)
		oItems:SetProperty("CellState",0,h,0)
		oItems:SetProperty("CellHasCheckBox",0,h,.F.)
RETURN

PROCEDURE OnSelectionChanged(oTree)
	LOCAL oItems
	oItems := oTree:Items()
		oItems:SetProperty("CellState",oItems:FocusItem(),0,1)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:DblClick := {|Shift,X,Y| OnDblClick(oTree,Shift,X,Y)} /*Occurs when the user dblclk the left mouse button over an object.*/
		oTree:SelectionChanged := {|| OnSelectionChanged(oTree)} /*Fired after a new item has been selected.*/

		oTree:MarkSearchColumn := .F.
		oTree:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,128 } )  , .F. ))
		oTree:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Radio 1")
			oItems:SetProperty("CellHasRadioButton",h,0,.T.)
			oItems:SetProperty("CellRadioGroup",h,0,1234)
			h := oItems:AddItem("Radio 2")
			oItems:SetProperty("CellHasRadioButton",h,0,.T.)
			oItems:SetProperty("CellRadioGroup",h,0,1234)
			oItems:SetProperty("CellState",h,0,1)
			h := oItems:AddItem("Radio 3")
			oItems:SetProperty("CellHasRadioButton",h,0,.T.)
			oItems:SetProperty("CellRadioGroup",h,0,1234)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
516
The Column.Alignment property does not seem to work for cells with images in them. What can be done

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:TreeColumnIndex := -1
		oTree:DrawGridLines := -1/*exAllLines*/
		oTree:HeaderHeight := 24
		oTree:MarkSearchColumn := .F.
		oTree:DefaultItemHeight := 24
		oColumn := oTree:Columns():Add("Image")
			oColumn:AllowSizing := .F.
			oColumn:Width := 32
			oColumn:HTMLCaption := "<img>1</img>"
			oColumn:HeaderAlignment := 1/*CenterAlignment*/
			oColumn:Alignment := 1/*CenterAlignment*/
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oTree:Columns():Add("Rest")
		oItems := oTree:Items()
			oItems:AddItem("<img>1</img>")
			oItems:AddItem("<img>2</img>")
			oItems:AddItem("<img>3</img>")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
515
Can I change the format of date to be shown in the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oColumns := oTree:Columns()
			oColumns:Add("Default")
			oColumn := oColumns:Add("Format.1")
				oColumn:ComputedField := "%0"
				oColumn:FormatColumn := "dateF(value) replace `/` with `-`"
			oColumn1 := oColumns:Add("Format.2")
				oColumn1:ComputedField := "%0"
				oColumn1:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn1:FormatColumn := "`<b>`+ shortdate(value) + `</b> ` + timeF(value)"
			oColumn2 := oColumns:Add("Format.3")
				oColumn2:ComputedField := "%0"
				oColumn2:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn2:FormatColumn := "( dateF(value) replace `/` with `-` ) + ` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `Fr`; 6 : `Sa`) )"
		oItems := oTree:Items()
			oItems:AddItem("01/01/2001 10:00:00")
			oItems:AddItem("01/02/2001 10:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
514
Is it possible to scroll the control's content by clicking and dragging

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		oTree:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:AutoDrag := 16/*exAutoDragScroll*/
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
513
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a snapshot
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oTree:SetProperty("HTMLPicture","p1","c:\exontrol\images\card.png")
		oTree:SetProperty("HTMLPicture","p2","c:\exontrol\images\sun.png")
		oTree:AutoDrag := 11/*exAutoDragCopySnapShot*/
		oTree:LinesAtRoot := 0/*exNoLinesAtRoot*/
		oTree:HasLines := 2/*exThinLine*/
		oTree:ShowFocusRect := .F.
		oTree:DefaultItemHeight := 26
		oTree:Columns():Add("Task")
		oItems := oTree:Items()
			h := oItems:AddItem("<img>p1:32</img>Group 1")
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemBold",h,.T.)
			h1 := oItems:InsertItem(h,,"Task 1")
			h2 := oItems:InsertItem(h,,"Task 2")
			h3 := oItems:InsertItem(h,,"Task 3")
			h := oItems:AddItem("<img>p2:32</img>Group 2")
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:SetProperty("ItemDivider",h,0)
			h1 := oItems:InsertItem(h,,"Task")
			oItems:SetProperty("ExpandItem",0,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
512
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a image

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h,var_HTMLPicture
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:SetProperty("HTMLPicture","p1","c:\exontrol\images\card.png")
		oTree:SetProperty("HTMLPicture","p2","c:\exontrol\images\sun.png")
		var_HTMLPicture := oTree:HTMLPicture("aka1")
		oTree:HeaderHeight := 24
		oTree:DefaultItemHeight := 48
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oTree:SelBackMode := 1/*exTransparent*/
		oTree:ColumnAutoResize := .F.
		oTree:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:Columns:Item(0):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oTree:Columns:Item(0):FormatColumn := "value + ` <img>p` + (1 + (value mod 3 ) ) + `</img>`"
		oTree:Columns:Item(0):Width := 112
		oTree:Columns:Item(1):SetProperty("Def",0/*exCellHasCheckBox*/,1)
		oTree:Columns:Item(2):LevelKey := "1"
		oTree:Columns:Item(3):LevelKey := "1"
		oTree:Columns:Item(4):LevelKey := "1"
		oTree:AutoDrag := 10/*exAutoDragCopyImage*/
		oTree:SingleSel := .F.
		oItems := oTree:Items()
			h := oItems:ItemByIndex(1)
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:ItemByIndex(2)
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:ItemByIndex(3)
			oItems:SetProperty("SelectItem",h,.T.)
			oItems:SetProperty("LockedItemCount",2/*BottomAlignment*/,1)
			h := oItems:LockedItem(2/*BottomAlignment*/,0)
			oItems:SetProperty("CellCaption",h,1,"<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, ...")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
			oItems:SetProperty("CellCaptionFormat",h,1,1/*exHTML*/)
			oItems:SetProperty("CellHAlignment",h,1,1/*CenterAlignment*/)
			oItems:SetProperty("ItemDivider",h,1)
			oItems:SetProperty("ItemDividerLineAlignment",h,2/*DividerTop*/)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
511
How can copy and paste the selection to Microsoft Word, Excel or any OLE compliant application, as a text

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		oTree:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:Columns:Item(2):LevelKey := "1"
		oTree:Columns:Item(3):LevelKey := "1"
		oTree:Columns:Item(4):LevelKey := "1"
		oTree:AutoDrag := 9/*exAutoDragCopyText*/
		oTree:SingleSel := .F.
		oItems := oTree:Items()
			h := oItems:ItemByIndex(1)
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:ItemByIndex(3)
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:ItemByIndex(4)
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:ItemByIndex(5)
			oItems:SetProperty("SelectItem",h,.T.)
			oItems:SetProperty("LockedItemCount",2/*BottomAlignment*/,1)
			h := oItems:LockedItem(2/*BottomAlignment*/,0)
			oItems:SetProperty("CellCaption",h,0,"<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, Excel, ...")
			oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/)
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemDividerLineAlignment",h,2/*DividerTop*/)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
510
Is it possible to change the indentation during the drag and drop

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oTree:AutoDrag := 3/*exAutoDragPositionAny*/
		oTree:LinesAtRoot := 0/*exNoLinesAtRoot*/
		oTree:HasLines := 1/*exSolidLine*/
		oTree:HasButtons := 3/*exWPlus*/
		oTree:ShowFocusRect := .F.
		oTree:SelBackMode := 1/*exTransparent*/
		oTree:Columns():Add("Task")
		oItems := oTree:Items()
			h := oItems:AddItem("Group 1")
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:SetProperty("ItemDivider",h,0)
			h1 := oItems:InsertItem(h,,"Task 1")
			h2 := oItems:InsertItem(h1,,"Task 2")
			h2 := oItems:InsertItem(h1,,"Task 3")
			h3 := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ExpandItem",h1,.T.)
			h := oItems:AddItem("Group 2")
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("LockedItemCount",2/*BottomAlignment*/,1)
			h := oItems:LockedItem(2/*BottomAlignment*/,0)
			oItems:SetProperty("CellCaption",h,0,"Click a row, and move by dragging <b>up, down</b> to change the row's parent or <b>left,right</b> to increase or decrease the indentation.")
			oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/)
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
509
Is it possible to allow moving an item to another, but keeping its indentation

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oTree:AutoDrag := 2/*exAutoDragPositionKeepIndent*/
		oTree:LinesAtRoot := 0/*exNoLinesAtRoot*/
		oTree:HasLines := 2/*exThinLine*/
		oTree:ShowFocusRect := .F.
		oTree:Columns():Add("Task")
		oItems := oTree:Items()
			h := oItems:AddItem("Group 1")
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemBold",h,.T.)
			h1 := oItems:InsertItem(h,,"Task 1")
			h2 := oItems:InsertItem(h,,"Task 2")
			h3 := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Group 2")
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:SetProperty("ItemDivider",h,0)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
508
How can I change the row's position to another, by drag and drop. Is it possible

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ShowFocusRect := .F.
		oTree:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oTree:AutoDrag := 1/*exAutoDragPosition*/
		oTree:Columns():Add("Task")
		oItems := oTree:Items()
			oItems:AddItem("Task 1")
			oItems:AddItem("Task 2")
			oItems:AddItem("Task 3")
			oItems:AddItem("Task 4")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
507
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ScrollBars := 15/*exDisableBoth*/
		oTree:SetProperty("ScrollPartVisible",0/*exVScroll*/,65536/*exExtentThumbPart*/,.T.)
		oTree:SetProperty("ScrollPartVisible",1/*exHScroll*/,65536/*exExtentThumbPart*/,.T.)
		oTree:SetProperty("ScrollPartVisible",2/*0x2+*/,65536/*exExtentThumbPart*/,.T.)
		oTree:ScrollWidth := 4
		oTree:SetProperty("Background",276/*exVSBack*/,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oTree:SetProperty("Background",260/*exVSThumb*/,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oTree:ScrollHeight := 4
		oTree:SetProperty("Background",404/*exHSBack*/,oTree:Background(276/*exVSBack*/))
		oTree:SetProperty("Background",388/*exHSThumb*/,oTree:Background(260/*exVSThumb*/))
		oTree:SetProperty("Background",511/*exScrollSizeGrip*/,oTree:Background(276/*exVSBack*/))
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
506
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("Car")
				oColumn:DisplayFilterButton := .T.
				oColumn:FilterType := 240/*exFilter*/
				oColumn:Filter := "MAZDA"
			oColumn1 := oColumns:Add("Equipment")
				oColumn1:DisplayFilterButton := .T.
				oColumn1:DisplayFilterPattern := .F.
				oColumn1:CustomFilter := "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"
				oColumn1:FilterType := 3/*exPattern*/
				oColumn1:Filter := "AIR BAG"
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"Air Bag")
			oItems:SetProperty("CellCaption",oItems:AddItem("Toyota"),1,"Air Bag,Air condition")
			oItems:SetProperty("CellCaption",oItems:AddItem("Ford"),1,"Air condition")
			oItems:SetProperty("CellCaption",oItems:AddItem("Nissan"),1,"Air Bag,ABS,ESP")
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"Air Bag, ABS,ESP")
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"ABS,ESP")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
505
How can I have a case-sensitive filter

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("Car")
				oColumn:DisplayFilterButton := .T.
				oColumn:FilterType := 496/*exFilterDoCaseSensitive+exFilter*/
				oColumn:Filter := "Mazda"
			oColumn1 := oColumns:Add("Equipment")
				oColumn1:DisplayFilterButton := .T.
				oColumn1:DisplayFilterPattern := .F.
				oColumn1:CustomFilter := "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"
				oColumn1:FilterType := 259/*exFilterDoCaseSensitive+exPattern*/
				oColumn1:Filter := "Air Bag"
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"Air Bag")
			oItems:SetProperty("CellCaption",oItems:AddItem("Toyota"),1,"Air Bag,Air condition")
			oItems:SetProperty("CellCaption",oItems:AddItem("Ford"),1,"Air condition")
			oItems:SetProperty("CellCaption",oItems:AddItem("Nissan"),1,"Air Bag,ABS,ESP")
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"Air Bag, ABS,ESP")
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"ABS,ESP")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
504
I have several columns, but noticed that the filter is using AND between columns, but I need OR clause for filtering. Is it possible

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Item")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:Filter := "Child 1"
			oColumn:FilterType := 240/*exFilter*/
		oColumn1 := oTree:Columns():Add("Date")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:DisplayFilterPattern := .F.
			oColumn1:DisplayFilterDate := .T.
			oColumn1:FilterList := 9474/*exShowExclude+exShowFocusItem+exShowCheckBox+exNoItems*/
			oColumn1:Filter := Transform("12/28/2010","")
			oColumn1:FilterType := 4/*exDate*/
		oTree:FilterCriteria := "%0 or %1"
		oTree:SetProperty("Description",23/*exFilterBarOr*/,"<font ;18><fgcolor=FF0000>or</fgcolor></font>")
		oTree:SetProperty("Description",11/*exFilterBarAnd*/,"<font ;18><fgcolor=FF0000>and</fgcolor></font>")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Child 1"),1,"12/27/2010")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Child 2"),1,"12/28/2010")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Child 1"),1,"12/29/2010")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Child 2"),1,"12/30/2010")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
503
Is it possible exclude the dates being selected in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("Date")
			oColumn:SortType := 2/*SortDate*/
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:DisplayFilterDate := .T.
			oColumn:FilterList := 9474/*exShowExclude+exShowFocusItem+exShowCheckBox+exNoItems*/
		oItems := oTree:Items()
			oItems:AddItem("12/27/2010")
			oItems:AddItem("12/28/2010")
			oItems:AddItem("12/29/2010")
			oItems:AddItem("12/30/2010")
			oItems:AddItem("12/31/2010")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
502
How can I display a calendar control inside the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("Date")
			oColumn:SortType := 2/*SortDate*/
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:DisplayFilterDate := .T.
			oColumn:FilterList := 1282/*exShowFocusItem+exShowCheckBox+exNoItems*/
		oItems := oTree:Items()
			oItems:AddItem("12/27/2010")
			oItems:AddItem("12/28/2010")
			oItems:AddItem("12/29/2010")
			oItems:AddItem("12/30/2010")
			oItems:AddItem("12/31/2010")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
501
Is it possible to include the dates as checkb-boxes in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("Dates")
			oColumn:SortType := 2/*SortDate*/
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .T.
			oColumn:DisplayFilterDate := .T.
			oColumn:FilterList := 1280/*exShowFocusItem+exShowCheckBox*/
			oColumn:Filter := "to 12/27/2010"
			oColumn:FilterType := 4/*exDate*/
		oItems := oTree:Items()
			oItems:AddItem("12/27/2010")
			oItems:AddItem("12/28/2010")
			oItems:AddItem("12/29/2010")
			oItems:AddItem("12/30/2010")
			oItems:AddItem("12/31/2010")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN